package com.ehotting.edsta.circuitDesign.enums;

public enum  SignalTypeEnum  implements BaseEnum {


    OTHER(0,"other","无"),
    VOLTAGE(1,"voltage","电压"),
    CURRENT(2,"current","电流"),
    ACCELERATION(3,"acceleration","加速度"),
    TEMPERATURE(4,"temperature","温度"),
    HUMIDITY(5,"humidity","湿度"),
    PRESSURE(6,"pressure","气压"),
    VIBRATE(7,"vibrate","振动") ;



    private Integer value;
    private String name;
    private String code;

    SignalTypeEnum(Integer value, String code,String name) {
        this.value = value;
        this.code = code;
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public static SignalTypeEnum getSignalTypeEnumByName(String name) {
        SignalTypeEnum[] values = SignalTypeEnum.values();
        for (SignalTypeEnum value : values) {
            if (value.getName().equals(name)) {
                return value;
            }
        }
        return SignalTypeEnum.OTHER;
    }
}
